package top.kaoshanji.p3ch13a;

import java.security.Principal;

/**
 * 代码清单-p3ch13a-407页a：Principal接口实现类的示例
 * author kaoshanji
 * ^_^
 * create time 2025/2/7 17:57
 */
public class UserPrincipal implements Principal {

    private final String userName;

    public UserPrincipal(String userName) {
        this.userName = userName;
    }

    @Override
    public String getName() {
        return userName;
    }
}
